<template>
	<view class="content">
    <button @click="toHome">home</button>
    <button @click="doLogin">login</button>
	</view>
</template>

<script>
import cryptoJs from '@/utils/cryptoJs'
	export default {
	  mounted() {
    },
    data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
      toHome(){
        // uni.showToast({
        //   title:'11111111111111'
        // })
        uni.navigateTo({
          url: '/pages/home/index'
        })
      },
      doLogin(){
        this.$request({
          url: '/login',
          method: 'POST',
          params:{
            timestamp: new Date().getTime()
          },
          data:{
            username: cryptoJs.encrypt("admin123"),
            password: cryptoJs.encrypt("123456")
          }
        })
      }
		}
	}
</script>

<style>

</style>
